#ifndef t_keyboard_h
#define t_keyboard_h
/*
 * Sylvain BERTRAND <digital.ragnarok@gmail.com>
 * code protected by GNU GPL v3
 */
G_BEGIN_DECLS
enum t_modkeys_key {
	T_KEYBOARD_MODKEY_NONE,
	T_KEYBOARD_MODKEY_CAPSLOCK,
	T_KEYBOARD_MODKEY_NUMLOCK,
	T_KEYBOARD_MODKEY_SCROLLLOCK,
	T_KEYBOARD_MODKEY_SHIFT,
	T_KEYBOARD_MODKEY_CONTROL,
	T_KEYBOARD_MODKEY_SUPER,
	T_KEYBOARD_MODKEY_HYPER,
	T_KEYBOARD_MODKEY_META,
	T_KEYBOARD_MODKEY_ALT,
	T_KEYBOARD_NUM_MODKEYS
};
struct t_ic {
	guint ref;
	XIC xic;
	Window client;
	Window focus;
};
void t_keyboard_reload(void);
guint t_keyboard_keyevent_to_modmask(XEvent *e);
guint t_keyboard_only_modmasks(guint mask);
guint t_keyboard_modkey_to_modmask(enum t_modkeys_key key);
KeySym t_keyboard_keypress_to_keysym(XEvent *ev);
struct t_ic *t_keyboard_context_new(Window client, Window focus);
void t_keyboard_context_unref(struct t_ic *ic);
G_END_DECLS
#endif
